﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DataLogical.TableClass;

namespace Biz.UserManagement
{
    public class Role
    {
        public enum RoleType
        {
            Applicant = 1,
            Approver = 2,
            GAUser = 3,
            IDAdmin = 4
        }

        private string roleName = string.Empty;

        public string RoleName
        {
            get { return roleName; }
            set { roleName = value; }
        }

        private int id = -1;

        public int Id
        {
            get { return id; }
            set { id = value; }
        }

        private RoleType roleID;

        public RoleType RoleID
        {
            get { return roleID; }
            set { roleID = value; }
        }

        public Role(int _id)
        {
            Id = _id;
            RoleID = (RoleType)Enum.Parse(typeof(RoleType), _id.ToString());
            RoleName = new tblRole(_id).ROLE_NAME;
        }
    }
}
